/*
 * @Author: 赖维健(lwj1994)
 * @Date: 2022-11-13 20:32:52
 * @LastEditors: 赖维健(lwj1994)
 * @LastEditTime: 2022-11-13 20:40:06
 * @Description: 项目相关接口
 */
import { axios } from '@/utils/request'

// 新增或修改项目
export function saveOrUpdate(data) {
  return axios({
    url: '/onlcode/project/saveOrUpdate',
    method: 'post',
    data
  })
}

// 查询所有项目列表
export function listAll(data) {
  return axios({
    url: '/onlcode/project/listAll',
    method: 'get',
    params: data
  })
}

// 分页查询项目列表
export function queryByPage(data) {
  return axios({
    url: '/onlcode/project/queryByPage',
    method: 'get',
    params: data
  })
}

// 根据id查询项目明细
export function getById(data) {
  return axios({
    url: '/onlcode/project/getById',
    method: 'get',
    params: data
  })
}

// 根据id获取项目配置步骤信息
export function getProjectConfig(data) {
  return axios({
    url: '/onlcode/project/getProjectConfig',
    method: 'get',
    params: data
  })
}

// 根据项目ID和表单ID获取发布到项目信息
export function queryProjectFormById(data) {
  return axios({
    url: '/onlcode/project/form/queryProjectFormById',
    method: 'get',
    params: data
  })
}

// 根据应用id查询业务过程路径
export function queryProcessUrl(data) {
  return axios({
    url: '/onlcode/project/process/queryProcessUrl',
    method: 'get',
    params: data
  })
}

// 应用业务过程-保存接口
export function saveBusinessProcess(data) {
  return axios({
    url: '/onlcode/project/process/saveBusinessProcess',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'text/xml'
    }
  })
}
